<?php
/**
 * Created by PhpStorm.
 * User: XQLS_PC
 * Date: 2017/3/8
 * Time: 8:08
 */

function lj($a){
    $res=0;
    for($i=0;$i<=$a;$i++){
        $res+=$i;
    }
    return $res;


}

function dg($a){
    if($a==1){
        return 1;
    }



    return $a+dg($a-1);
}
var_dump(dg(100));
var_dump(lj(100));
